package com.uzai.console.vo.user;

import com.uzai.common.utils.EsIndexName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @Auther: jianghan
 * @Date: 2021/9/14 10:48
 * @Description:
 */
@ApiModel("营销奖励数据")
@Document(indexName = EsIndexName.UZAI_MARKETING_REWARD_INFO, shards = 3, replicas = 2)
public class MarketingRewardVo implements Serializable {

    //id格式为：用户ID+deviceTypeId。如：1234560
    @Id
    private String id;
    @ApiModelProperty("添加好友奖励")
    private ReDetail addRe;
    @ApiModelProperty("绑定上级，奖励下级")
    private ReDetail bindRe;
    @ApiModelProperty("绑定上级，奖励上级")
    private ReDetail bindReParent;
    @ApiModelProperty("绑定代理，奖励代理")
    private ReDetail bindReAgent;
    @ApiModelProperty("绑定合伙人，奖励合伙人")
    private ReDetail bindRePartner;
    @ApiModelProperty("首查奖励")
    private ReDetail firstQueryRe;
    @ApiModelProperty("首单奖励")
    private ReDetail firstOrderRe;
    @ApiModelProperty("首次收货奖励")
    private ReDetail firstSettledRe;

    @ApiModelProperty("版本号")
    @Field(type = FieldType.Long)
    private Long version = 0L;

    private Integer createTime;
    private Integer updateTime;

    public MarketingRewardVo(){}
    public MarketingRewardVo(boolean init){
        if (init){
            this.addRe = new ReDetail();
            this.bindRe = new ReDetail();
            this.bindReParent = new ReDetail();
            this.bindReAgent = new ReDetail();
            this.bindRePartner = new ReDetail();
            this.firstQueryRe = new ReDetail();
            this.firstOrderRe = new ReDetail();
            this.firstSettledRe = new ReDetail();
        }
    }

    public static class ReDetail implements Serializable {
        private static final long serialVersionUID = -7729207467008644147L;

        @ApiModelProperty("奖励的用户id，如上级用户id")
        private Long userId;
        @ApiModelProperty("奖励金额")
        private Double reBal;
        @ApiModelProperty("奖励积分")
        private Integer reInte;
        @ApiModelProperty("奖励方式 0发红包，1存账户余额")
        private Integer reType;
        @ApiModelProperty("奖励状态 0未奖励，1已奖励")
        private Integer status;
        @ApiModelProperty("门槛值 如：首单奖励的最小成交价等")
        private Double doorsillVal;
        @ApiModelProperty("其他开关 如：首笔订单结算后，上级才能得到奖励 0关，1开")
        private Integer switchVal;

        public Long getUserId() {
            return userId;
        }

        public void setUserId(Long userId) {
            this.userId = userId;
        }

        public Double getReBal() {
            return reBal;
        }

        public void setReBal(Double reBal) {
            this.reBal = reBal;
        }

        public Integer getReInte() {
            return reInte;
        }

        public void setReInte(Integer reInte) {
            this.reInte = reInte;
        }

        public Integer getReType() {
            return reType;
        }

        public void setReType(Integer reType) {
            this.reType = reType;
        }

        public Integer getStatus() {
            return status;
        }

        public void setStatus(Integer status) {
            this.status = status;
        }

        public Double getDoorsillVal() {
            return doorsillVal;
        }

        public void setDoorsillVal(Double doorsillVal) {
            this.doorsillVal = doorsillVal;
        }

        public Integer getSwitchVal() {
            return switchVal;
        }

        public void setSwitchVal(Integer switchVal) {
            this.switchVal = switchVal;
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public ReDetail getAddRe() {
        return addRe;
    }

    public void setAddRe(ReDetail addRe) {
        this.addRe = addRe;
    }

    public ReDetail getBindRe() {
        return bindRe;
    }

    public void setBindRe(ReDetail bindRe) {
        this.bindRe = bindRe;
    }

    public ReDetail getBindReParent() {
        return bindReParent;
    }

    public ReDetail getBindReAgent() {
        return bindReAgent;
    }

    public void setBindReAgent(ReDetail bindReAgent) {
        this.bindReAgent = bindReAgent;
    }

    public ReDetail getBindRePartner() {
        return bindRePartner;
    }

    public void setBindRePartner(ReDetail bindRePartner) {
        this.bindRePartner = bindRePartner;
    }

    public void setBindReParent(ReDetail bindReParent) {
        this.bindReParent = bindReParent;
    }

    public ReDetail getFirstQueryRe() {
        return firstQueryRe;
    }

    public void setFirstQueryRe(ReDetail firstQueryRe) {
        this.firstQueryRe = firstQueryRe;
    }

    public ReDetail getFirstOrderRe() {
        return firstOrderRe;
    }

    public void setFirstOrderRe(ReDetail firstOrderRe) {
        this.firstOrderRe = firstOrderRe;
    }

    public ReDetail getFirstSettledRe() {
        return firstSettledRe;
    }

    public void setFirstSettledRe(ReDetail firstSettledRe) {
        this.firstSettledRe = firstSettledRe;
    }

    public Integer getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Integer createTime) {
        this.createTime = createTime;
    }

    public Integer getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Integer updateTime) {
        this.updateTime = updateTime;
    }

    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }
}
